<%@ include file="/common/taglibs.jsp"%>

<head>
    <title><fmt:message key="cutProcessDetail.title"/></title>
    <meta name="heading" content="<fmt:message key='cutProcessDetail.heading'/>"/>
    <meta name="menu" content="RoleAdminCut"/>

    <script type="text/javascript" src="<c:url value='/scripts/calendar/calendar.js'/>"></script>
    <script type="text/javascript" src="<c:url value='/scripts/calendar/lang/calendar-es.js'/>"></script>
    <script type="text/javascript" src="<c:url value='/scripts/calendar/calendar-setup.js'/>"></script>
    <script type="text/javascript">
        window.onload = function() {
            Calendar.setup({
                inputField: "initDate",
                ifFormat: "%d/%m/%Y",
                button: "initDate"
            });

        }
    </script>
</head>
<div id="help">
    <h2>
        <a href="<c:url value='helpMaterialPurchase.html?decorate=false'/>"
           title="Help material purchase"
           onclick="Modalbox.show(this.href, {title: this.title, width: 600}); return false;">
               <fmt:message key="help"/>
        </a>
    </h2>
</div>
<table>
<tr>
    <td>
    <s:form id="cutProcessForm" action="saveCutProcess" method="post" validate="true">
    <fieldset>
     <legend><fmt:message key="cutProcessForm.selectDatas"/></legend>
    
        <s:hidden name="cutProcess.id" value="%{cutProcess.id}"/>
        <table>
            <tr>
                <td>
                    <s:select label="%{getText('cutProcess.employee')}" name="cutProcess.employee.id"
                              list="employeesList" listKey="id" listValue="fullName" required="true"
                              headerKey="-1" headerValue="--- Please Select ---" />
                </td>
                <td>
                    <s:textfield id="initDate" key="initDateCuProcess" required="true" size="9"/>
                </td>
            </tr>
            <tr >
                <td colspan="3">
                    <li class="buttonBar bottom">
                        <s:submit cssClass="button" method="saveCutProcess" key="button.save" theme="simple"/>
                        <c:if test="${not empty cutProcess.id}">
                            <s:submit cssClass="button" method="delete" key="button.delete" onclick="return confirmDelete('cutProcess')" theme="simple"/>
                        </c:if>
                        <input type="button" style="margin-right: 5px"
                               onclick="location.href='<c:url value="/doneAddCutDetail.html"/>'"
                               value="<fmt:message key="button.done"/>"/>
                        <s:submit cssClass="button" method="cancel" key="button.cancel" theme="simple"/>
                    </li>
                </td>
            </tr>
        </table>
    
    </fieldset>
     </s:form>
</td>
</tr>
</table>